package com.ls.modules.sys.biz.manager;

import com.ls.modules.sys.dal.jpa.dao.TestDao;
import com.ls.modules.sys.dal.jpa.entity.TestEntity;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

/**
 * @author: xiaosu
 * @date: 2018-09-17  12:13
 */

@Service
public class TestManager    {

    @Autowired
    private TestDao testDao;

    @Transactional(rollbackFor =Exception.class)
    public void  insertEntity(){

        TestEntity  entity=new TestEntity();

        entity.setName("xiaosu");

        testDao.save(entity);


    }




}
